<?php
session_start();
$mod_title="игра-меню GM-а";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
if($auth=="ok")
{
$mcl="";
$perms="";
$query = "SELECT * FROM users WHERE login='$_COOKIE[login]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online) = mysql_fetch_row($cat))
{
$mcl=$class;
$level=$lvl;
$perms=$pms;
}
$query = "SELECT * FROM count";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$guild,$arena) = mysql_fetch_row($cat))
{
$guildc=$guild;
$arenac=$arena;
}
echo "
<img src='img/bo.png'> <a href='?do=game/char'>персонаж($level)</a>|<img src='img/bs.png'> <a href='?do=game/history'>история</a><br>
<br>
";
$_pg="0";
$ag="-10";
$_pg2="10";
if(!empty($_GET['_pg']))
{
$ag=$_GET['_pg']-"10";
$_pg=$_GET['_pg'];
$_pg2=$_GET['_pg']+"10";
}
if($perms=="100")
{
if(empty($_GET['dox']))
{
echo "
<form method='POST' action='?do=game/gm/addmob&dox=go'>
имя:<br>
<input type='text' name='name' size='15'><br>
локация:<br>
<input type='text' name='inst' size='15'><br>
level:<br>
<input type='text' name='lvl' size='15' value='1'><br>
сила:<br>
<input type='text' name='s' size='15' value='0'><br>
магия:<br>
<input type='text' name='m' size='15' value='0'><br>
HP:<br>
<input type='text' name='h' size='15' value='0'><br>
exp+:<br>
<input type='text' name='expp' size='15' value='0'><br>
exp-:<br>
<input type='text' name='expm' size='15' value='0'><br>
серебро+:<br>
<input type='text' name='mp' size='15' value='0'><br>
серебро-:<br>
<input type='text' name='mm' size='15' value='0'><br>
диапозон drop-а:<br>
<input type='text' name='drop' size='15' value='1,3'><br>
<input type='submit' value='добавить моба'><br>
</form>
<br>
";
}
else
{
$query = "INSERT INTO mobs (name,inst,lvl,s,m,h,expp,expm,mp,mm,drop2) VALUES ('$_POST[name]','$_POST[inst]','$_POST[lvl]','$_POST[s]','$_POST[m]','$_POST[h]','$_POST[expp]','$_POST[expm]','$_POST[mp]','$_POST[mm]','$_POST[drop]')";
$result = mysql_query ($query)
or die ("<span style='color:red'>ошибка!</span>");
echo "<span style='color:green'>моб добавлен!</span><br>";
}
}
else
{
echo "Вы не администратор!<br>";
}
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>